﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AssignRecipient.aspx.cs"
    Inherits="H2.NET.Web.Workflow.Workflow.AssignRecipient" %>
    
    <script type="text/javascript">

        $(function () {
            $(".recipient", $.pdialog.getCurrent()).InitSelect2("请选择执行人", "<%= Page.ResolveUrl("~/workflow/AssignRecipient.aspx?action=search_recipient")%>", "name", null, "", "2");
        });

</script>

<div class="pageContent">
    <form id="Form1" runat="server" method="post" action="Workflow/AssignRecipient.aspx?action=save"
    class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone, '确定要提交吗？');">
    <div class="pageFormContent" layouth="40" style="padding: 0px;">
        <asp:hiddenfield runat="server" id="hidProcess"></asp:hiddenfield>
        <asp:hiddenfield runat="server" id="hidIncident"></asp:hiddenfield>
        <table class="list" width="100%">
            <thead>
                <tr>
                    <th>
                        步骤名
                    </th>
                    <th width="150">
                        当前执行人(WinId)
                    </th>
                    <th width="150">
                        当前执行人(Full Name)
                    </th>
                    <th width="250">
                        指派执行人
                    </th>
                </tr>
            </thead>
            <tbody>
                <% 
                    foreach (var step in CurrentSteps)
                     {
                %>
                         <tr>
                             <td><%= step.strStepName %></td>
                             <td style="text-align: center;"><%= step.strAssignedToUser%></td>
                             <td style="text-align: center;"><%= step.strAssignedToUserFullName%></td>
                             <td style="text-align: center;">
                                <input type="hidden" name="recipient_<%= step.strTaskId %>" class="recipient" style="width: 100%" />
                                <input type="hidden" name="taskid" value="<%= step.strTaskId %>"/>
                             </td>
                         </tr>
                <% 
                     } 
                %>
            </tbody>
        </table>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            确认提交</button></div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">
                            关闭窗口</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
